package com.zzyl.nursing.mapper;

import com.zzyl.nursing.domain.NursingProjectPlan;
import com.zzyl.nursing.dto.NursingProjectPlanDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 护理计划和项目关联Mapper接口
 * 
 * @author ruoyi
 * @date 2025-07-22
 */
public interface NursingProjectPlanMapper {
    /**
     * 查询护理计划和项目关联
     *
     * @param id 护理计划和项目关联主键
     * @return 护理计划和项目关联
     */
    public NursingProjectPlan selectNursingProjectPlanById(Long id);

    /**
     * 查询护理计划和项目关联列表
     *
     * @param nursingProjectPlan 护理计划和项目关联
     * @return 护理计划和项目关联集合
     */
    public List<NursingProjectPlan> selectNursingProjectPlanList(NursingProjectPlan nursingProjectPlan);

    /**
     * 新增护理计划和项目关联
     *
     * @param nursingProjectPlan 护理计划和项目关联
     * @return 结果
     */
    public int insertNursingProjectPlan(NursingProjectPlan nursingProjectPlan);

    /**
     * 修改护理计划和项目关联
     *
     * @param nursingProjectPlan 护理计划和项目关联
     * @return 结果
     */
    public int updateNursingProjectPlan(NursingProjectPlan nursingProjectPlan);

    /**
     * 删除护理计划和项目关联
     *
     * @param id 护理计划和项目关联主键
     * @return 结果
     */
    public int deleteNursingProjectPlanById(Long id);

    /**
     * 批量删除护理计划和项目关联
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteNursingProjectPlanByIds(Long[] ids);


//    int batchInsert(@Param("plan_id") Integer id, @Param("list") List<NursingProjectPlanDto> projectPlans);

// ... existing code ...

    /**
     * 批量插入护理计划关联项目
     *
     * @param planId       护理计划ID
     * @param projectPlans 项目列表
     * @return 插入结果
     */
    int batchInsert(@Param("plan_id") Integer planId, @Param("list") List<NursingProjectPlanDto> projectPlans);
// ... existing code ...
}
